home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 11 / Cream of the Crop 11-2.iso / extra / dj345en.zip / INSTALL.BAT < prev    next >
DOS Batch File  |  1995-10-30  |  10KB  |  192 lines

  1. @ECHO OFF
  2. REM =========================================================================
  3. REM Batch file installer for Printer Settings Program
  4. REM For English (US)
  5. REM Copyright(c) Hewlett-Packard Company, 1995
  6. REM =========================================================================
  7. REM =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  8. REM          Must check the existence of the files before continuing
  9. REM      if install.bat is not run from the installer disk, report error
  10. REM =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  11. IF NOT EXIST install.bat  GOTO INSTERROR
  12. REM =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  13. REM check the existence of files which are not country dependent
  14. REM =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  15. IF NOT EXIST pcp\djpmenu.ex_  GOTO FILEMISSING
  16. IF NOT EXIST pcp\expand.exe   GOTO FILEMISSING
  17. IF NOT EXIST pcp\font1.da_    GOTO FILEMISSING
  18. IF NOT EXIST pcp\font2.da_    GOTO FILEMISSING
  19. IF NOT EXIST pcp\hplogo.bat   GOTO FILEMISSING
  20. IF NOT EXIST pcp\hpask.com    GOTO FILEMISSING
  21. REM =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  22. REM check the existence of other files
  23. REM =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  24. IF NOT EXIST pcp\djptxt.us_   GOTO FILEMISSING
  25. IF NOT EXIST pcp\resource.us_ GOTO FILEMISSING
  26. IF NOT EXIST pcp\usa          GOTO FILEMISSING
  27. REM =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  28. REM start the installation process
  29. REM =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  30. :NOPORT
  31. CALL PCP\HPLOGO.BAT
  32. ECHO     ┌───────────────────────────────────────────────────────────────────┐
  33. ECHO     │      The DJPMenu configuration utility allows you to change       │
  34. ECHO     │      or define the settings on your HP DeskJet Portable           │
  35. ECHO     │      printers.                                                    │
  36. ECHO     │                                                                   │
  37. ECHO     │      Before installing DJPMenu, ensure that the printer           │
  38. ECHO     │      is connected to the parallel port of your computer           │
  39. ECHO     │      and POWERED on.                                              │
  40. ECHO     └───────────────────────────────────────────────────────────────────┘
  41. ECHO  
  42. ECHO            Which parallel port is the printer connected to?
  43. ECHO  
  44. ECHO            [1]  LPT1:             [2]  LPT2:             [3]  LPT3:
  45. ECHO  
  46. REM =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  47. REM Ask the user which port is the printer connected to.
  48. REM =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  49. PCP\HPASK "           Enter Printer Port Choice (1-3):"
  50. IF ERRORLEVEL 52 GOTO NOPORT
  51. IF ERRORLEVEL 51 GOTO PORT3
  52. IF ERRORLEVEL 50 GOTO PORT2
  53. IF ERRORLEVEL 49 GOTO PORT1
  54. GOTO NOPORT
  55. :PORT3
  56. SET PORT=LPT3:
  57. GOTO NEXT1
  58. :PORT2
  59. SET PORT=LPT2:
  60. GOTO NEXT1
  61. :PORT1
  62. SET PORT=LPT1:
  63. :NEXT1
  64. CALL PCP\HPLOGO.BAT
  65. ECHO     ┌───────────────────────────────────────────────────────────────────┐
  66. ECHO     │       The files will be copied to C:\DESKJET. The required        │
  67. ECHO     │       disk space is less than 100 Kbytes.                         │
  68. ECHO     └───────────────────────────────────────────────────────────────────┘
  69. ECHO  
  70. ECHO             You have chosen %PORT% as the parallel port.
  71. ECHO             If the port selection is wrong, you can quit the
  72. ECHO             installation by pressing Ctrl-C.
  73. ECHO  
  74. ECHO Ctrl-C to quit, or
  75. PAUSE
  76. REM =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  77. REM Inform user that the files will be expanded in C:\DESKJET directory.
  78. REM =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  79. CALL PCP\HPLOGO.BAT
  80. ECHO Installing ...
  81.  
  82. REM =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  83. REM If c:\deskjet directory does not exist, create it.
  84. REM =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  85. IF NOT EXIST c:\deskjet\nul GOTO NODIR
  86. GOTO DIROK
  87. :NODIR
  88. ECHO Creating directory C:\DESKJET
  89. MKDIR c:\deskjet
  90. :DIROK
  91.  
  92. REM =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  93. REM Copy resource string over to C:\DESKJET
  94. REM =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  95. ECHO Exploding RESOURCE in C:\DESKJET
  96. IF EXIST c:\deskjet\resource DEL c:\deskjet\resource
  97. pcp\expand pcp\resource.us_ c:\deskjet\resource > nul
  98.  
  99. REM =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  100. REM Copy font?.dat over to C:\DESKJET
  101. REM =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  102. ECHO Exploding FONT?.DAT in C:\DESKJET
  103. IF EXIST c:\deskjet\font1.dat DEL c:\deskjet\font1.dat
  104. pcp\expand -r pcp\font1.da_ c:\deskjet > nul
  105. IF EXIST c:\deskjet\font2.dat DEL c:\deskjet\font2.dat
  106. pcp\expand -r pcp\font2.da_ c:\deskjet > nul
  107.  
  108. REM =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  109. REM Copy djpmenu.txt over to C:\DESKJET
  110. REM =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  111. ECHO Exploding DJPMENU.TXT in C:\DESKJET
  112. IF EXIST c:\deskjet\djpmenu.txt DEL c:\deskjet\djpmenu.txt
  113. pcp\expand pcp\djptxt.us_ c:\deskjet\djpmenu.txt > nul
  114.  
  115. REM =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  116. REM Copy djpmenu.exe over to C:\DESKJET
  117. REM =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  118. ECHO Exploding DJPMENU.EXE in C:\DESKJET
  119. IF EXIST c:\deskjet\djpmenu.exe DEL c:\deskjet\djpmenu.exe
  120. pcp\expand -r pcp\djpmenu.ex_ c:\deskjet > nul
  121.  
  122. REM =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  123. REM Copy country defaults over to C:\DESKJET
  124. REM =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  125. ECHO Configuring the Country Default Settings of the printer
  126. copy pcp\usa %PORT% /b > nul
  127. set PORT=
  128. PAUSE
  129.  
  130. REM =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  131. REM Check all the necessary files have been copied over to C:\DESKJET
  132. REM =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  133. IF NOT EXIST c:\deskjet\djpmenu.exe  GOTO NOTCOMPLETE
  134. IF NOT EXIST c:\deskjet\djpmenu.txt  GOTO NOTCOMPLETE
  135. IF NOT EXIST c:\deskjet\resource     GOTO NOTCOMPLETE
  136. IF NOT EXIST c:\deskjet\font1.dat    GOTO NOTCOMPLETE
  137. IF NOT EXIST c:\deskjet\font2.dat    GOTO NOTCOMPLETE
  138. CALL PCP\HPLOGO.BAT
  139. ECHO     ┌───────────────────────────────────────────────────────────────────┐
  140. ECHO     │    The installation is completed.                                 │
  141. ECHO     │                                                                   │
  142. ECHO     │    Refer to the DJPMENU.TXT file in the directory C:\DESKJET      │
  143. ECHO     │    for information on using DJPMenu and its functions.            │
  144. ECHO     │    To run DJPMenu, type DJPMENU at the prompt C:\DESKJET.         │
  145. ECHO     │    You can also alter your AUTOEXEC.BAT to include C:\DESKJET     │
  146. ECHO     │    in the path.                                                   │
  147. ECHO     │                                                                   │
  148. ECHO     │    Also, check that the country default setting in the            │
  149. ECHO     │    Advanced Settings menu of DJPMenu is set to United States.     │
  150. ECHO     │    For HP DeskJet Portable, HP DeskJet 310 and HP DeskJet 320     │
  151. ECHO     │    the country default selected will only be activated after      │ 
  152. ECHO     │    the printer is reset (press the Online and Setup keys while    │ 
  153. ECHO     │    powering up the printer).                                      │
  154. ECHO     └───────────────────────────────────────────────────────────────────┘
  155. ECHO  
  156. GOTO END
  157. :NOTCOMPLETE
  158. CALL PCP\HPLOGO.BAT
  159. ECHO     ┌───────────────────────────────────────────────────────────────────┐
  160. ECHO     │      One or more files was not copied properly. This may be       │
  161. ECHO     │      due to insufficient disk space on drive C. Clear             │
  162. ECHO     │      some disk space on drive C and run the installation          │
  163. ECHO     │      program again.                                               │
  164. ECHO     └───────────────────────────────────────────────────────────────────┘
  165. ECHO  
  166. GOTO END
  167. :INSTERROR
  168. CLS
  169. ECHO     ┌───────────────────────────────────────────────────────────────────┐
  170. ECHO     │                            ** ERROR **                            │
  171. ECHO     │                                                                   │
  172. ECHO     │        You must run INSTALL from the installation disk.           │
  173. ECHO     │        Insert the disk in drive A:, change to drive A:            │  
  174. ECHO     │        and type INSTALL.                                          │
  175. ECHO     └───────────────────────────────────────────────────────────────────┘
  176. ECHO  
  177. GOTO END
  178. REM =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  179. REM Error message to inform the user that he/she might accientally delete
  180. REM file(s) from the installer disk which is/are important.
  181. REM =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  182. :FILEMISSING
  183. ECHO     ┌───────────────────────────────────────────────────────────────────┐
  184. ECHO     │                            ** ERROR **                            │
  185. ECHO     │                                                                   │
  186. ECHO     │         Some files are missing from your installation disk.       │
  187. ECHO     │         Contact your nearest HP support center for a              │
  188. ECHO     │         replacement disk.                                         │
  189. ECHO     └───────────────────────────────────────────────────────────────────┘
  190. ECHO  
  191. :END
  192.